The disclosed embodiments of the present invention relate to video data processing, and more particularly, to a video encoding method and apparatus for determining a size of a parallel motion estimation region based on encoding related information and related video decoding method and apparatus.
Video compression, i.e., video encoding, is an essential technique for digital video storage and transmission. In general, video compression/encoding includes applying at least prediction, transform, quantization and entropy coding to sequential blocks of pixels in a video sequence to compress/encode the video sequence. The video decompression, i.e., video decoding, generally performs the inverse of these operations used in video compression/encoding to decompress/decode a compressed/encoded video sequence.
High efficiency video coding (HEVC) is one coding standard proposed to have improvement in coding efficiency over other coding standard such as H.264, as well as larger resolutions and higher frame rates. Several coding efficiency enhancement tools are proposed in HEVC standard. For example, a merge mode is designed to reduce coding overhead by allowing an inter-predicted prediction unit (PU) to inherit motion data, i.e., motion vectors, prediction direction and reference picture indices, from a position selected from spatial motion data positions in the same picture and temporal motion data positions derived based on a co-located PU in a reference picture. It is denoted as merge mode since it forms a merged region sharing all motion information. However, these spatial motion data positions are in other PUs. As a result, this dependency on motion data from positions in other PUs creates difficulty for parallel motion estimation in the video encoder.
To achieve parallel motion estimation, one largest coding unit (LCU) is divided in one or more non-overlapping parallel motion estimation regions of equal size. The non-overlapping parallel motion estimation region is also called parallel merge level in HEVC standard. From one parallel motion estimation region to another parallel motion estimation region, the motion estimation is sequentially performed. That is, motion estimation is performed on the next parallel motion estimation region after the motion estimation on the current parallel motion estimation region is completed. However, within one parallel motion estimation region, motion estimation for merge mode is performed in parallel for all of the PUs in the same parallel motion estimation region. More specifically, within a parallel motion estimation region, there is no dependency between the motion vectors of neighboring blocks in the same parallel motion estimation region when deriving motion vectors of merge mode. In this way, the derivation of motion vectors of merge mode in a parallel motion estimation region only uses motion vectors outside the parallel motion estimation region.
In a conventional design, the size of the parallel motion estimation region is set by an encoder configuration before the encoding process is started. Therefore, the fixed size of the parallel motion estimation region is used for encoding frames in a video sequence, which lacks flexibility in video encoding and fails to achieve an optimum parallel degree of encoding for different encoding applications.